package main

import (
	"fmt"
	"sync"
)

func (p *person) printPerson(w *sync.WaitGroup) {

	fmt.Println(p)
	defer w.Done()
}

func main() {
	var p = person{
		salary: 100,
		level:  1,
	}

	sw := sync.WaitGroup{}
	sw.Add(1)
	go p.printPerson(&sw)
	sw.Wait()
}
